package com.metis.document.parse.dialog.pipeline.impl;

import com.metis.document.parse.dialog.pipeline.TextPostProcess;
import com.metis.document.parse.dialog.utils.Gongshi;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;

/**
 * 处理 section.content 中的公式信息
 */
@Slf4j
@Component
public class FormulaPostProcess implements TextPostProcess {

    @Override
    public String process(@NotNull String input) {
        if(StringUtils.isNotEmpty(input)){
            return Gongshi.gongshi.replaceGongShi(input);
        }
        return input;
    }
}
